package com.crean.demo.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.crean.demo.entity.User;
import com.crean.demo.mapper.UserMapper;
import com.crean.demo.service.IUserService;
import org.springframework.stereotype.Service;

/**
 * user Service
 *
 * @author lfr
 */
@Service
public class UserService extends ServiceImpl<UserMapper, User> implements IUserService {

    /**
     * 获取名称分组数量
     *
     * @return
     */
    @Override
    public int getCountGroupByName() {
        Integer count = getBaseMapper().selectCountGroupByName();
        if (count == null) {
            return 0;
        }
        return count;
    }
}
